package com.fudan.es.entity;

public class Metric {
	private String name;
	private MetricType type;
	private FieldMeta field;

	private int size = 10;
	public static Metric build(MetricType type,FieldMeta field) {
		Metric metric = new Metric();
		metric.setType(type);
		metric.setField(field);
		return metric;
	}

	public Metric subMetric(Metric metric) {
		return this;
	}

	public MetricType getType() {
		return type;
	}
	public void setType(MetricType type) {
		this.type = type;
	}
	public FieldMeta getField() {
		return field;
	}
	public void setField(FieldMeta field) {
		this.field = field;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}


	public static enum MetricType {
		_COUNT,COUNT, SUM, AVG;
	}
}
